import { post } from '@/request/http'
// import { toString } from '@/utils/utils'
import store from '@/store'

//查询规格
export const getNormList=({
  normName,//规格名称
  normCode,//规格代码
  PageIndexs,
  PageSizes
})=>{
  return post('/FTKJWLHYPT/base/getNormList',{

    Data: {
      Parameters: {
        FTKJWLHYPT: {
          normName,
          normCode
        }
      },
      PageIndex: {
        FTKJWLHYPT: PageIndexs
      },
      PageSize: {
        FTKJWLHYPT: PageSizes
      }

    }

  })
}

//新增规格
export const addNorm=({
  normName,
  normCode,
  remark
})=>{
  return post ('/FTKJWLHYPT/base/addNorm',{

    Data: {
      Parameters: {
        FTKJWLHYPT: {
          normName,
          normCode,
          fltUuid: store.state.user.FLT_UUID_DX_H,
          depId:store.state.user.DPTID_DX_H,
          creator:store.state.user.USR_CODE_DX_H,
          remark
        }
      }
    }
  })
}

//编辑国家
export const editNorm=({
  id,
  normName,
  normCode,
  remark
})=>{
  return post('/FTKJWLHYPT/base/editNorm',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          id,
          normName,
          normCode,
          lastModifier:store.state.user.USR_CODE_DX_H,
          remark
        }
      }
    }
  })
}

//删除国家
export const delNorm=(id)=>{
  return post('/FTKJWLHYPT/base/delNorm',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          id
        }
      }
    }
  })
}
